package com.ruantong.dingtalk.util;

import java.util.Date;

/**
 * @author jh.cjh
 * @description:日期处理工具
 * @date 2020-11-19
 */
public class DingDateUtils {

    public static Date getDayBeginTime(Date thisDay) {
        return getDayAtTime(thisDay, 0, 0, 0);
    }

    public static Date getDayEndTime(Date thisDay) {
        return getDayAtTime(thisDay, 23, 59, 59);
    }

    public static Date getDayAtTime(Date day, int hour, int minute, int sec) {
        day.setHours(hour);
        day.setMinutes(minute);
        day.setSeconds(sec);
        return day;
    }

}
